package com.ourteam.system.dao;

import net.dao.BaseQueryBean;
import net.dao.BaseWhereCriterion;
import net.dao.IDataAccessInterface;

import org.apache.commons.lang.StringUtils;

import java.util.Arrays;
import java.util.List;
import java.util.Map;


/**
 * Template Name : DAO查询对象
 * Template Version : 1
 * Template Last Modfiy Date : Sat Aug 19 10:06:32 CST 2017
 * Auto Generate Date : 2018-07-31 15:13:33
  * Warning ! This file will be overwrite when regenerate !
  *
 */
public class SysDepartmentDAOQueryBean extends BaseQueryBean {
    public SysDepartmentDAOQueryBean() {
        super();
    }

    public SysDepartmentDAOQueryBean(BaseQueryBean aQueryBean) {
        super(aQueryBean);
    }

    public SysDepartmentDAOQueryBean(BaseQueryBean aQueryBean,
        Map tableReplaceMap) {
        super(aQueryBean, tableReplaceMap);
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();

        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }

        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        return new Criteria(this);
    }

    public void addIdSelectProperty() {
        addIdSelectProperty("id");
    }

    public void addIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysDepartmentDAO.Id, aAlias);
        } else {
            addSelectProperty(ISysDepartmentDAO.Id, "id");
        }
    }

    public void addParentIdSelectProperty() {
        addParentIdSelectProperty("parentId");
    }

    public void addParentIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysDepartmentDAO.ParentId, aAlias);
        } else {
            addSelectProperty(ISysDepartmentDAO.ParentId, "parentId");
        }
    }

    public void addDepartmentNameSelectProperty() {
        addDepartmentNameSelectProperty("departmentName");
    }

    public void addDepartmentNameSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysDepartmentDAO.DepartmentName, aAlias);
        } else {
            addSelectProperty(ISysDepartmentDAO.DepartmentName, "departmentName");
        }
    }

    public void addDescriptionSelectProperty() {
        addDescriptionSelectProperty("description");
    }

    public void addDescriptionSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysDepartmentDAO.Description, aAlias);
        } else {
            addSelectProperty(ISysDepartmentDAO.Description, "description");
        }
    }

    public void addStatusSelectProperty() {
        addStatusSelectProperty("status");
    }

    public void addStatusSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysDepartmentDAO.Status, aAlias);
        } else {
            addSelectProperty(ISysDepartmentDAO.Status, "status");
        }
    }

    public void addModifyTimeSelectProperty() {
        addModifyTimeSelectProperty("modifyTime");
    }

    public void addModifyTimeSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysDepartmentDAO.ModifyTime, aAlias);
        } else {
            addSelectProperty(ISysDepartmentDAO.ModifyTime, "modifyTime");
        }
    }

    public void addOperatorIdSelectProperty() {
        addOperatorIdSelectProperty("operatorId");
    }

    public void addOperatorIdSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysDepartmentDAO.OperatorId, aAlias);
        } else {
            addSelectProperty(ISysDepartmentDAO.OperatorId, "operatorId");
        }
    }

    public void addSortIndexSelectProperty() {
        addSortIndexSelectProperty("sortIndex");
    }

    public void addSortIndexSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysDepartmentDAO.SortIndex, aAlias);
        } else {
            addSelectProperty(ISysDepartmentDAO.SortIndex, "sortIndex");
        }
    }

    public void addOperatorNameSelectProperty() {
        addOperatorNameSelectProperty("operatorName");
    }

    public void addOperatorNameSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysDepartmentDAO.OperatorName, aAlias);
        } else {
            addSelectProperty(ISysDepartmentDAO.OperatorName, "operatorName");
        }
    }

    public void addParentDepartmentNameSelectProperty() {
        addParentDepartmentNameSelectProperty("parentDepartmentName");
    }

    public void addParentDepartmentNameSelectProperty(String aAlias) {
        if (StringUtils.isNotBlank(aAlias)) {
            addSelectProperty(ISysDepartmentDAO.ParentDepartmentName, aAlias);
        } else {
            addSelectProperty(ISysDepartmentDAO.ParentDepartmentName,
                "parentDepartmentName");
        }
    }

    public void addAllSelectProperties() {
        addIdSelectProperty();

        addParentIdSelectProperty();

        addDepartmentNameSelectProperty();

        addDescriptionSelectProperty();

        addStatusSelectProperty();

        addModifyTimeSelectProperty();

        addOperatorIdSelectProperty();

        addSortIndexSelectProperty();

        addOperatorNameSelectProperty();

        addParentDepartmentNameSelectProperty();
    }

    public static class Criteria extends BaseWhereCriterion<SysDepartmentDAOQueryBean> {
        protected Criteria(SysDepartmentDAOQueryBean aParentObject) {
            super(aParentObject);
        }

        public Criteria andIdIsNull() {
            addCriterion(ISysDepartmentDAO.Id + " is null");

            return this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion(ISysDepartmentDAO.Id + " is not null");

            return this;
        }

        public Criteria andIdIsNotEmpty() {
            addCriterion(ISysDepartmentDAO.Id + " is not null AND " +
                ISysDepartmentDAO.Id + " <> ''");

            return this;
        }

        public Criteria andIdIsEmpty() {
            addCriterion("(" + ISysDepartmentDAO.Id + " is null OR " +
                ISysDepartmentDAO.Id + " = '')");

            return this;
        }

        public Criteria andIdEqualTo(long value) {
            return andIdEqualTo(Long.valueOf(value));
        }

        public Criteria andIdEqualTo(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.Id + " = ", value, "id");

            return this;
        }

        public Criteria andIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Id);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Id + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdNotEqualTo(long value) {
            return andIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.Id + " <>", value, "id");

            return this;
        }

        public Criteria andIdNotEqualToOrIsNull(long value) {
            return andIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.Id + " is null OR " +
                ISysDepartmentDAO.Id + " <>", value, "id");

            return this;
        }

        public Criteria andIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Id);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Id + " <> ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdGreaterThan(long value) {
            return andIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.Id + " >", value, "id");

            return this;
        }

        public Criteria andIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Id);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Id + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdGreaterThanOrEqualTo(long value) {
            return andIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.Id + " >=", value, "id");

            return this;
        }

        public Criteria andIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Id);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdGreaterThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Id + " >= ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdLessThan(long value) {
            return andIdLessThan(Long.valueOf(value));
        }

        public Criteria andIdLessThan(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.Id + " <", value, "id");

            return this;
        }

        public Criteria andIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Id);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Id + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdLessThanOrEqualTo(long value) {
            return andIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.Id + " <=", value, "id");

            return this;
        }

        public Criteria andIdLessThanOrEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Id);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andIdLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Id + " <= ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdIn(long[] values) {
            if (values.length == 1) {
                return andIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.Id + " in", values, "id");

                return this;
            }
        }

        public Criteria andIdNotIn(long[] values) {
            if (values.length == 1) {
                return andIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.Id + " not in", values, "id");

                return this;
            }
        }

        public Criteria andIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.Id + " in", values, "id");

                return this;
            }
        }

        public Criteria andIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.Id + " not in", values, "id");

                return this;
            }
        }

        public Criteria andIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andIdEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.Id + " in",
                    Arrays.asList(values), "id");

                return this;
            }
        }

        public Criteria andIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.Id + " not in",
                    Arrays.asList(values), "id");

                return this;
            }
        }

        public Criteria andIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Id + " in ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Id + " not in ", subQueryBean, dao);

            return this;
        }

        public Criteria andIdBetween(long value1, long value2) {
            addCriterion(ISysDepartmentDAO.Id + " between", value1, value2, "id");

            return this;
        }

        public Criteria andIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysDepartmentDAO.Id + " between", value1, value2, "id");

            return this;
        }

        public Criteria andIdNotBetween(long value1, long value2) {
            addCriterion(ISysDepartmentDAO.Id + " not between", value1, value2,
                "id");

            return this;
        }

        public Criteria andIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysDepartmentDAO.Id + " not between", value1, value2,
                "id");

            return this;
        }

        public Criteria andParentIdIsNull() {
            addCriterion(ISysDepartmentDAO.ParentId + " is null");

            return this;
        }

        public Criteria andParentIdIsNotNull() {
            addCriterion(ISysDepartmentDAO.ParentId + " is not null");

            return this;
        }

        public Criteria andParentIdIsNotEmpty() {
            addCriterion(ISysDepartmentDAO.ParentId + " is not null AND " +
                ISysDepartmentDAO.ParentId + " <> ''");

            return this;
        }

        public Criteria andParentIdIsEmpty() {
            addCriterion("(" + ISysDepartmentDAO.ParentId + " is null OR " +
                ISysDepartmentDAO.ParentId + " = '')");

            return this;
        }

        public Criteria andParentIdEqualTo(long value) {
            return andParentIdEqualTo(Long.valueOf(value));
        }

        public Criteria andParentIdEqualTo(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.ParentId + " = ", value, "parentId");

            return this;
        }

        public Criteria andParentIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ParentId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentId + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andParentIdNotEqualTo(long value) {
            return andParentIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andParentIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.ParentId + " <>", value, "parentId");

            return this;
        }

        public Criteria andParentIdNotEqualToOrIsNull(long value) {
            return andParentIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andParentIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.ParentId + " is null OR " +
                ISysDepartmentDAO.ParentId + " <>", value, "parentId");

            return this;
        }

        public Criteria andParentIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ParentId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentId + " <> ", subQueryBean, dao);

            return this;
        }

        public Criteria andParentIdGreaterThan(long value) {
            return andParentIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andParentIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.ParentId + " >", value, "parentId");

            return this;
        }

        public Criteria andParentIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ParentId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentId + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andParentIdGreaterThanOrEqualTo(long value) {
            return andParentIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andParentIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.ParentId + " >=", value, "parentId");

            return this;
        }

        public Criteria andParentIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ParentId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentId + " >= ", subQueryBean, dao);

            return this;
        }

        public Criteria andParentIdLessThan(long value) {
            return andParentIdLessThan(Long.valueOf(value));
        }

        public Criteria andParentIdLessThan(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.ParentId + " <", value, "parentId");

            return this;
        }

        public Criteria andParentIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ParentId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentId + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andParentIdLessThanOrEqualTo(long value) {
            return andParentIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andParentIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.ParentId + " <=", value, "parentId");

            return this;
        }

        public Criteria andParentIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ParentId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentId + " <= ", subQueryBean, dao);

            return this;
        }

        public Criteria andParentIdIn(long[] values) {
            if (values.length == 1) {
                return andParentIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.ParentId + " in", values,
                    "parentId");

                return this;
            }
        }

        public Criteria andParentIdNotIn(long[] values) {
            if (values.length == 1) {
                return andParentIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.ParentId + " not in", values,
                    "parentId");

                return this;
            }
        }

        public Criteria andParentIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andParentIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.ParentId + " in", values,
                    "parentId");

                return this;
            }
        }

        public Criteria andParentIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andParentIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.ParentId + " not in", values,
                    "parentId");

                return this;
            }
        }

        public Criteria andParentIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andParentIdEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.ParentId + " in",
                    Arrays.asList(values), "parentId");

                return this;
            }
        }

        public Criteria andParentIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andParentIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.ParentId + " not in",
                    Arrays.asList(values), "parentId");

                return this;
            }
        }

        public Criteria andParentIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentId + " in ", subQueryBean, dao);

            return this;
        }

        public Criteria andParentIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentId + " not in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andParentIdBetween(long value1, long value2) {
            addCriterion(ISysDepartmentDAO.ParentId + " between", value1,
                value2, "parentId");

            return this;
        }

        public Criteria andParentIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysDepartmentDAO.ParentId + " between", value1,
                value2, "parentId");

            return this;
        }

        public Criteria andParentIdNotBetween(long value1, long value2) {
            addCriterion(ISysDepartmentDAO.ParentId + " not between", value1,
                value2, "parentId");

            return this;
        }

        public Criteria andParentIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysDepartmentDAO.ParentId + " not between", value1,
                value2, "parentId");

            return this;
        }

        public Criteria andDepartmentNameIsNull() {
            addCriterion(ISysDepartmentDAO.DepartmentName + " is null");

            return this;
        }

        public Criteria andDepartmentNameIsNotNull() {
            addCriterion(ISysDepartmentDAO.DepartmentName + " is not null");

            return this;
        }

        public Criteria andDepartmentNameIsNotEmpty() {
            addCriterion(ISysDepartmentDAO.DepartmentName +
                " is not null AND " + ISysDepartmentDAO.DepartmentName +
                " <> ''");

            return this;
        }

        public Criteria andDepartmentNameIsEmpty() {
            addCriterion("(" + ISysDepartmentDAO.DepartmentName +
                " is null OR " + ISysDepartmentDAO.DepartmentName + " = '')");

            return this;
        }

        public Criteria andDepartmentNameEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " = ", value,
                "departmentName");

            return this;
        }

        public Criteria andDepartmentNameEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.DepartmentName);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentNameEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameNotEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " <>", value,
                "departmentName");

            return this;
        }

        public Criteria andDepartmentNameNotEqualToOrIsNull(String value) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " is null OR " +
                ISysDepartmentDAO.DepartmentName + " <>", value,
                "departmentName");

            return this;
        }

        public Criteria andDepartmentNameNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.DepartmentName);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentNameNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameGreaterThan(String value) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " >", value,
                "departmentName");

            return this;
        }

        public Criteria andDepartmentNameGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.DepartmentName);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentNameGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameGreaterThanOrEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " >=", value,
                "departmentName");

            return this;
        }

        public Criteria andDepartmentNameGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.DepartmentName);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentNameGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameLessThan(String value) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " <", value,
                "departmentName");

            return this;
        }

        public Criteria andDepartmentNameLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.DepartmentName);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentNameLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameLessThanOrEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " <=", value,
                "departmentName");

            return this;
        }

        public Criteria andDepartmentNameLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.DepartmentName);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDepartmentNameLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysDepartmentDAO.DepartmentName + " like",
                buffer.toString(), "departmentName");

            return this;
        }

        public Criteria andDepartmentNameNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysDepartmentDAO.DepartmentName + " not like",
                buffer.toString(), "departmentName");

            return this;
        }

        public Criteria andDepartmentNameIn(List<String> values) {
            if (values.size() == 1) {
                return andDepartmentNameEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.DepartmentName + " in", values,
                    "departmentName");

                return this;
            }
        }

        public Criteria andDepartmentNameNotIn(List<String> values) {
            if (values.size() == 1) {
                return andDepartmentNameNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.DepartmentName + " not in",
                    values, "departmentName");

                return this;
            }
        }

        public Criteria andDepartmentNameIn(String[] values) {
            if (values.length == 1) {
                return andDepartmentNameEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.DepartmentName + " in",
                    Arrays.asList(values), "departmentName");

                return this;
            }
        }

        public Criteria andDepartmentNameNotIn(String[] values) {
            if (values.length == 1) {
                return andDepartmentNameNotEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.DepartmentName + " not in",
                    Arrays.asList(values), "departmentName");

                return this;
            }
        }

        public Criteria andDepartmentNameIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDepartmentNameBetween(String value1, String value2) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " between", value1,
                value2, "departmentName");

            return this;
        }

        public Criteria andDepartmentNameNotBetween(String value1, String value2) {
            addCriterion(ISysDepartmentDAO.DepartmentName + " not between",
                value1, value2, "departmentName");

            return this;
        }

        public Criteria andDescriptionIsNull() {
            addCriterion(ISysDepartmentDAO.Description + " is null");

            return this;
        }

        public Criteria andDescriptionIsNotNull() {
            addCriterion(ISysDepartmentDAO.Description + " is not null");

            return this;
        }

        public Criteria andDescriptionIsNotEmpty() {
            addCriterion(ISysDepartmentDAO.Description + " is not null AND " +
                ISysDepartmentDAO.Description + " <> ''");

            return this;
        }

        public Criteria andDescriptionIsEmpty() {
            addCriterion("(" + ISysDepartmentDAO.Description + " is null OR " +
                ISysDepartmentDAO.Description + " = '')");

            return this;
        }

        public Criteria andDescriptionEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.Description + " = ", value,
                "description");

            return this;
        }

        public Criteria andDescriptionEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Description);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDescriptionEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Description + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDescriptionNotEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.Description + " <>", value,
                "description");

            return this;
        }

        public Criteria andDescriptionNotEqualToOrIsNull(String value) {
            addCriterion(ISysDepartmentDAO.Description + " is null OR " +
                ISysDepartmentDAO.Description + " <>", value, "description");

            return this;
        }

        public Criteria andDescriptionNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Description);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDescriptionNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Description + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDescriptionGreaterThan(String value) {
            addCriterion(ISysDepartmentDAO.Description + " >", value,
                "description");

            return this;
        }

        public Criteria andDescriptionGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Description);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDescriptionGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Description + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.Description + " >=", value,
                "description");

            return this;
        }

        public Criteria andDescriptionGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Description);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDescriptionGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Description + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDescriptionLessThan(String value) {
            addCriterion(ISysDepartmentDAO.Description + " <", value,
                "description");

            return this;
        }

        public Criteria andDescriptionLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Description);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDescriptionLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Description + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDescriptionLessThanOrEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.Description + " <=", value,
                "description");

            return this;
        }

        public Criteria andDescriptionLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Description);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andDescriptionLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Description + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDescriptionLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysDepartmentDAO.Description + " like",
                buffer.toString(), "description");

            return this;
        }

        public Criteria andDescriptionNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysDepartmentDAO.Description + " not like",
                buffer.toString(), "description");

            return this;
        }

        public Criteria andDescriptionIn(List<String> values) {
            if (values.size() == 1) {
                return andDescriptionEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.Description + " in", values,
                    "description");

                return this;
            }
        }

        public Criteria andDescriptionNotIn(List<String> values) {
            if (values.size() == 1) {
                return andDescriptionNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.Description + " not in", values,
                    "description");

                return this;
            }
        }

        public Criteria andDescriptionIn(String[] values) {
            if (values.length == 1) {
                return andDescriptionEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.Description + " in",
                    Arrays.asList(values), "description");

                return this;
            }
        }

        public Criteria andDescriptionNotIn(String[] values) {
            if (values.length == 1) {
                return andDescriptionNotEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.Description + " not in",
                    Arrays.asList(values), "description");

                return this;
            }
        }

        public Criteria andDescriptionIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Description + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andDescriptionNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Description + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andDescriptionBetween(String value1, String value2) {
            addCriterion(ISysDepartmentDAO.Description + " between", value1,
                value2, "description");

            return this;
        }

        public Criteria andDescriptionNotBetween(String value1, String value2) {
            addCriterion(ISysDepartmentDAO.Description + " not between",
                value1, value2, "description");

            return this;
        }

        public Criteria andStatusIsNull() {
            addCriterion(ISysDepartmentDAO.Status + " is null");

            return this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion(ISysDepartmentDAO.Status + " is not null");

            return this;
        }

        public Criteria andStatusIsNotEmpty() {
            addCriterion(ISysDepartmentDAO.Status + " is not null AND " +
                ISysDepartmentDAO.Status + " <> ''");

            return this;
        }

        public Criteria andStatusIsEmpty() {
            addCriterion("(" + ISysDepartmentDAO.Status + " is null OR " +
                ISysDepartmentDAO.Status + " = '')");

            return this;
        }

        public Criteria andStatusEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.Status + " = ", value, "status");

            return this;
        }

        public Criteria andStatusEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Status);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Status + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusNotEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.Status + " <>", value, "status");

            return this;
        }

        public Criteria andStatusNotEqualToOrIsNull(String value) {
            addCriterion(ISysDepartmentDAO.Status + " is null OR " +
                ISysDepartmentDAO.Status + " <>", value, "status");

            return this;
        }

        public Criteria andStatusNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Status);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Status + " <> ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusGreaterThan(String value) {
            addCriterion(ISysDepartmentDAO.Status + " >", value, "status");

            return this;
        }

        public Criteria andStatusGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Status);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Status + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.Status + " >=", value, "status");

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Status);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Status + " >= ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLessThan(String value) {
            addCriterion(ISysDepartmentDAO.Status + " <", value, "status");

            return this;
        }

        public Criteria andStatusLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Status);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Status + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.Status + " <=", value, "status");

            return this;
        }

        public Criteria andStatusLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.Status);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andStatusLessThanOrEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Status + " <= ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysDepartmentDAO.Status + " like", buffer.toString(),
                "status");

            return this;
        }

        public Criteria andStatusNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysDepartmentDAO.Status + " not like",
                buffer.toString(), "status");

            return this;
        }

        public Criteria andStatusIn(List<String> values) {
            if (values.size() == 1) {
                return andStatusEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.Status + " in", values, "status");

                return this;
            }
        }

        public Criteria andStatusNotIn(List<String> values) {
            if (values.size() == 1) {
                return andStatusNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.Status + " not in", values,
                    "status");

                return this;
            }
        }

        public Criteria andStatusIn(String[] values) {
            if (values.length == 1) {
                return andStatusEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.Status + " in",
                    Arrays.asList(values), "status");

                return this;
            }
        }

        public Criteria andStatusNotIn(String[] values) {
            if (values.length == 1) {
                return andStatusNotEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.Status + " not in",
                    Arrays.asList(values), "status");

                return this;
            }
        }

        public Criteria andStatusIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Status + " in ", subQueryBean, dao);

            return this;
        }

        public Criteria andStatusNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.Status + " not in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andStatusBetween(String value1, String value2) {
            addCriterion(ISysDepartmentDAO.Status + " between", value1, value2,
                "status");

            return this;
        }

        public Criteria andStatusNotBetween(String value1, String value2) {
            addCriterion(ISysDepartmentDAO.Status + " not between", value1,
                value2, "status");

            return this;
        }

        public Criteria andModifyTimeIsNull() {
            addCriterion(ISysDepartmentDAO.ModifyTime + " is null");

            return this;
        }

        public Criteria andModifyTimeIsNotNull() {
            addCriterion(ISysDepartmentDAO.ModifyTime + " is not null");

            return this;
        }

        public Criteria andModifyTimeIsNotEmpty() {
            addCriterion(ISysDepartmentDAO.ModifyTime + " is not null AND " +
                ISysDepartmentDAO.ModifyTime + " <> ''");

            return this;
        }

        public Criteria andModifyTimeIsEmpty() {
            addCriterion("(" + ISysDepartmentDAO.ModifyTime + " is null OR " +
                ISysDepartmentDAO.ModifyTime + " = '')");

            return this;
        }

        public Criteria andModifyTimeEqualTo(java.util.Date value) {
            addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime + " = ",
                value, "modifyTime");

            return this;
        }

        public Criteria andModifyTimeEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ModifyTime);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModifyTimeEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ModifyTime + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andModifyTimeNotEqualTo(java.util.Date value) {
            addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime + " <>",
                value, "modifyTime");

            return this;
        }

        public Criteria andModifyTimeNotEqualToOrIsNull(java.util.Date value) {
            addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime +
                " is null OR " + ISysDepartmentDAO.ModifyTime + " <>", value,
                "modifyTime");

            return this;
        }

        public Criteria andModifyTimeNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ModifyTime);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModifyTimeNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ModifyTime + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andModifyTimeGreaterThan(java.util.Date value) {
            addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime + " >", value,
                "modifyTime");

            return this;
        }

        public Criteria andModifyTimeGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ModifyTime);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModifyTimeGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ModifyTime + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andModifyTimeGreaterThanOrEqualTo(java.util.Date value) {
            addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime + " >=",
                value, "modifyTime");

            return this;
        }

        public Criteria andModifyTimeGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ModifyTime);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModifyTimeGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ModifyTime + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andModifyTimeLessThan(java.util.Date value) {
            addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime + " <", value,
                "modifyTime");

            return this;
        }

        public Criteria andModifyTimeLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ModifyTime);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModifyTimeLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ModifyTime + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andModifyTimeLessThanOrEqualTo(java.util.Date value) {
            addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime + " <=",
                value, "modifyTime");

            return this;
        }

        public Criteria andModifyTimeLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ModifyTime);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andModifyTimeLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ModifyTime + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andModifyTimeIn(List<java.util.Date> values) {
            if (values.size() == 1) {
                return andModifyTimeEqualTo(values.get(0));
            } else {
                addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime + " in",
                    values, "modifyTime");

                return this;
            }
        }

        public Criteria andModifyTimeNotIn(List<java.util.Date> values) {
            if (values.size() == 1) {
                return andModifyTimeNotEqualTo(values.get(0));
            } else {
                addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime +
                    " not in", values, "modifyTime");

                return this;
            }
        }

        public Criteria andModifyTimeIn(java.util.Date[] values) {
            if (values.length == 1) {
                return andModifyTimeEqualTo(values[0]);
            } else {
                addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime + " in",
                    Arrays.asList(values), "modifyTime");

                return this;
            }
        }

        public Criteria andModifyTimeNotIn(java.util.Date[] values) {
            if (values.length == 1) {
                return andModifyTimeNotEqualTo(values[0]);
            } else {
                addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime +
                    " not in", Arrays.asList(values), "modifyTime");

                return this;
            }
        }

        public Criteria andModifyTimeIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ModifyTime + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andModifyTimeNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ModifyTime + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andModifyTimeBetween(java.util.Date value1,
            java.util.Date value2) {
            addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime + " between",
                value1, value2, "modifyTime");

            return this;
        }

        public Criteria andModifyTimeNotBetween(java.util.Date value1,
            java.util.Date value2) {
            addCriterionForJDBCDate(ISysDepartmentDAO.ModifyTime +
                " not between", value1, value2, "modifyTime");

            return this;
        }

        public Criteria andOperatorIdIsNull() {
            addCriterion(ISysDepartmentDAO.OperatorId + " is null");

            return this;
        }

        public Criteria andOperatorIdIsNotNull() {
            addCriterion(ISysDepartmentDAO.OperatorId + " is not null");

            return this;
        }

        public Criteria andOperatorIdIsNotEmpty() {
            addCriterion(ISysDepartmentDAO.OperatorId + " is not null AND " +
                ISysDepartmentDAO.OperatorId + " <> ''");

            return this;
        }

        public Criteria andOperatorIdIsEmpty() {
            addCriterion("(" + ISysDepartmentDAO.OperatorId + " is null OR " +
                ISysDepartmentDAO.OperatorId + " = '')");

            return this;
        }

        public Criteria andOperatorIdEqualTo(long value) {
            return andOperatorIdEqualTo(Long.valueOf(value));
        }

        public Criteria andOperatorIdEqualTo(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.OperatorId + " = ", value,
                "operatorId");

            return this;
        }

        public Criteria andOperatorIdEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.OperatorId);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andOperatorIdEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorId + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andOperatorIdNotEqualTo(long value) {
            return andOperatorIdNotEqualTo(Long.valueOf(value));
        }

        public Criteria andOperatorIdNotEqualTo(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.OperatorId + " <>", value,
                "operatorId");

            return this;
        }

        public Criteria andOperatorIdNotEqualToOrIsNull(long value) {
            return andOperatorIdNotEqualToOrIsNull(Long.valueOf(value));
        }

        public Criteria andOperatorIdNotEqualToOrIsNull(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.OperatorId + " is null OR " +
                ISysDepartmentDAO.OperatorId + " <>", value, "operatorId");

            return this;
        }

        public Criteria andOperatorIdNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.OperatorId);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andOperatorIdNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorId + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andOperatorIdGreaterThan(long value) {
            return andOperatorIdGreaterThan(Long.valueOf(value));
        }

        public Criteria andOperatorIdGreaterThan(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.OperatorId + " >", value,
                "operatorId");

            return this;
        }

        public Criteria andOperatorIdGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.OperatorId);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andOperatorIdGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorId + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andOperatorIdGreaterThanOrEqualTo(long value) {
            return andOperatorIdGreaterThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andOperatorIdGreaterThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.OperatorId + " >=", value,
                "operatorId");

            return this;
        }

        public Criteria andOperatorIdGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.OperatorId);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andOperatorIdGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorId + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andOperatorIdLessThan(long value) {
            return andOperatorIdLessThan(Long.valueOf(value));
        }

        public Criteria andOperatorIdLessThan(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.OperatorId + " <", value,
                "operatorId");

            return this;
        }

        public Criteria andOperatorIdLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.OperatorId);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andOperatorIdLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorId + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andOperatorIdLessThanOrEqualTo(long value) {
            return andOperatorIdLessThanOrEqualTo(Long.valueOf(value));
        }

        public Criteria andOperatorIdLessThanOrEqualTo(java.lang.Long value) {
            addCriterion(ISysDepartmentDAO.OperatorId + " <=", value,
                "operatorId");

            return this;
        }

        public Criteria andOperatorIdLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.OperatorId);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andOperatorIdLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorId + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andOperatorIdIn(long[] values) {
            if (values.length == 1) {
                return andOperatorIdEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.OperatorId + " in", values,
                    "operatorId");

                return this;
            }
        }

        public Criteria andOperatorIdNotIn(long[] values) {
            if (values.length == 1) {
                return andOperatorIdNotEqualTo((java.lang.Long) values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.OperatorId + " not in", values,
                    "operatorId");

                return this;
            }
        }

        public Criteria andOperatorIdIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andOperatorIdEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.OperatorId + " in", values,
                    "operatorId");

                return this;
            }
        }

        public Criteria andOperatorIdNotIn(List<java.lang.Long> values) {
            if (values.size() == 1) {
                return andOperatorIdNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.OperatorId + " not in", values,
                    "operatorId");

                return this;
            }
        }

        public Criteria andOperatorIdIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andOperatorIdEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.OperatorId + " in",
                    Arrays.asList(values), "operatorId");

                return this;
            }
        }

        public Criteria andOperatorIdNotIn(java.lang.Long[] values) {
            if (values.length == 1) {
                return andOperatorIdNotEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.OperatorId + " not in",
                    Arrays.asList(values), "operatorId");

                return this;
            }
        }

        public Criteria andOperatorIdIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorId + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andOperatorIdNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorId + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andOperatorIdBetween(long value1, long value2) {
            addCriterion(ISysDepartmentDAO.OperatorId + " between", value1,
                value2, "operatorId");

            return this;
        }

        public Criteria andOperatorIdBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysDepartmentDAO.OperatorId + " between", value1,
                value2, "operatorId");

            return this;
        }

        public Criteria andOperatorIdNotBetween(long value1, long value2) {
            addCriterion(ISysDepartmentDAO.OperatorId + " not between", value1,
                value2, "operatorId");

            return this;
        }

        public Criteria andOperatorIdNotBetween(java.lang.Long value1,
            java.lang.Long value2) {
            addCriterion(ISysDepartmentDAO.OperatorId + " not between", value1,
                value2, "operatorId");

            return this;
        }

        public Criteria andSortIndexIsNull() {
            addCriterion(ISysDepartmentDAO.SortIndex + " is null");

            return this;
        }

        public Criteria andSortIndexIsNotNull() {
            addCriterion(ISysDepartmentDAO.SortIndex + " is not null");

            return this;
        }

        public Criteria andSortIndexIsNotEmpty() {
            addCriterion(ISysDepartmentDAO.SortIndex + " is not null AND " +
                ISysDepartmentDAO.SortIndex + " <> ''");

            return this;
        }

        public Criteria andSortIndexIsEmpty() {
            addCriterion("(" + ISysDepartmentDAO.SortIndex + " is null OR " +
                ISysDepartmentDAO.SortIndex + " = '')");

            return this;
        }

        public Criteria andSortIndexEqualTo(int value) {
            return andSortIndexEqualTo(Integer.valueOf(value));
        }

        public Criteria andSortIndexEqualTo(java.lang.Integer value) {
            addCriterion(ISysDepartmentDAO.SortIndex + " = ", value, "sortIndex");

            return this;
        }

        public Criteria andSortIndexEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.SortIndex);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSortIndexEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.SortIndex + " = ", subQueryBean, dao);

            return this;
        }

        public Criteria andSortIndexNotEqualTo(int value) {
            return andSortIndexNotEqualTo(Integer.valueOf(value));
        }

        public Criteria andSortIndexNotEqualTo(java.lang.Integer value) {
            addCriterion(ISysDepartmentDAO.SortIndex + " <>", value, "sortIndex");

            return this;
        }

        public Criteria andSortIndexNotEqualToOrIsNull(int value) {
            return andSortIndexNotEqualToOrIsNull(Integer.valueOf(value));
        }

        public Criteria andSortIndexNotEqualToOrIsNull(java.lang.Integer value) {
            addCriterion(ISysDepartmentDAO.SortIndex + " is null OR " +
                ISysDepartmentDAO.SortIndex + " <>", value, "sortIndex");

            return this;
        }

        public Criteria andSortIndexNotEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.SortIndex);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSortIndexNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.SortIndex + " <> ", subQueryBean, dao);

            return this;
        }

        public Criteria andSortIndexGreaterThan(int value) {
            return andSortIndexGreaterThan(Integer.valueOf(value));
        }

        public Criteria andSortIndexGreaterThan(java.lang.Integer value) {
            addCriterion(ISysDepartmentDAO.SortIndex + " >", value, "sortIndex");

            return this;
        }

        public Criteria andSortIndexGreaterThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.SortIndex);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSortIndexGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.SortIndex + " > ", subQueryBean, dao);

            return this;
        }

        public Criteria andSortIndexGreaterThanOrEqualTo(int value) {
            return andSortIndexGreaterThanOrEqualTo(Integer.valueOf(value));
        }

        public Criteria andSortIndexGreaterThanOrEqualTo(
            java.lang.Integer value) {
            addCriterion(ISysDepartmentDAO.SortIndex + " >=", value, "sortIndex");

            return this;
        }

        public Criteria andSortIndexGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.SortIndex);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSortIndexGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.SortIndex + " >= ", subQueryBean, dao);

            return this;
        }

        public Criteria andSortIndexLessThan(int value) {
            return andSortIndexLessThan(Integer.valueOf(value));
        }

        public Criteria andSortIndexLessThan(java.lang.Integer value) {
            addCriterion(ISysDepartmentDAO.SortIndex + " <", value, "sortIndex");

            return this;
        }

        public Criteria andSortIndexLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.SortIndex);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSortIndexLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.SortIndex + " < ", subQueryBean, dao);

            return this;
        }

        public Criteria andSortIndexLessThanOrEqualTo(int value) {
            return andSortIndexLessThanOrEqualTo(Integer.valueOf(value));
        }

        public Criteria andSortIndexLessThanOrEqualTo(java.lang.Integer value) {
            addCriterion(ISysDepartmentDAO.SortIndex + " <=", value, "sortIndex");

            return this;
        }

        public Criteria andSortIndexLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.SortIndex);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andSortIndexLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.SortIndex + " <= ", subQueryBean, dao);

            return this;
        }

        public Criteria andSortIndexIn(int[] values) {
            if (values.length == 1) {
                return andSortIndexEqualTo((java.lang.Integer) values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.SortIndex + " in", values,
                    "sortIndex");

                return this;
            }
        }

        public Criteria andSortIndexNotIn(int[] values) {
            if (values.length == 1) {
                return andSortIndexNotEqualTo((java.lang.Integer) values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.SortIndex + " not in", values,
                    "sortIndex");

                return this;
            }
        }

        public Criteria andSortIndexIn(List<java.lang.Integer> values) {
            if (values.size() == 1) {
                return andSortIndexEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.SortIndex + " in", values,
                    "sortIndex");

                return this;
            }
        }

        public Criteria andSortIndexNotIn(List<java.lang.Integer> values) {
            if (values.size() == 1) {
                return andSortIndexNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.SortIndex + " not in", values,
                    "sortIndex");

                return this;
            }
        }

        public Criteria andSortIndexIn(java.lang.Integer[] values) {
            if (values.length == 1) {
                return andSortIndexEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.SortIndex + " in",
                    Arrays.asList(values), "sortIndex");

                return this;
            }
        }

        public Criteria andSortIndexNotIn(java.lang.Integer[] values) {
            if (values.length == 1) {
                return andSortIndexNotEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.SortIndex + " not in",
                    Arrays.asList(values), "sortIndex");

                return this;
            }
        }

        public Criteria andSortIndexIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.SortIndex + " in ", subQueryBean, dao);

            return this;
        }

        public Criteria andSortIndexNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.SortIndex + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andSortIndexBetween(int value1, int value2) {
            addCriterion(ISysDepartmentDAO.SortIndex + " between", value1,
                value2, "sortIndex");

            return this;
        }

        public Criteria andSortIndexBetween(java.lang.Integer value1,
            java.lang.Integer value2) {
            addCriterion(ISysDepartmentDAO.SortIndex + " between", value1,
                value2, "sortIndex");

            return this;
        }

        public Criteria andSortIndexNotBetween(int value1, int value2) {
            addCriterion(ISysDepartmentDAO.SortIndex + " not between", value1,
                value2, "sortIndex");

            return this;
        }

        public Criteria andSortIndexNotBetween(java.lang.Integer value1,
            java.lang.Integer value2) {
            addCriterion(ISysDepartmentDAO.SortIndex + " not between", value1,
                value2, "sortIndex");

            return this;
        }

        public Criteria andOperatorNameIsNull() {
            addCriterion(ISysDepartmentDAO.OperatorName + " is null");

            return this;
        }

        public Criteria andOperatorNameIsNotNull() {
            addCriterion(ISysDepartmentDAO.OperatorName + " is not null");

            return this;
        }

        public Criteria andOperatorNameIsNotEmpty() {
            addCriterion(ISysDepartmentDAO.OperatorName + " is not null AND " +
                ISysDepartmentDAO.OperatorName + " <> ''");

            return this;
        }

        public Criteria andOperatorNameIsEmpty() {
            addCriterion("(" + ISysDepartmentDAO.OperatorName + " is null OR " +
                ISysDepartmentDAO.OperatorName + " = '')");

            return this;
        }

        public Criteria andOperatorNameEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.OperatorName + " = ", value,
                "operatorName");

            return this;
        }

        public Criteria andOperatorNameEqualToForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.OperatorName);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andOperatorNameEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorName + " = ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andOperatorNameNotEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.OperatorName + " <>", value,
                "operatorName");

            return this;
        }

        public Criteria andOperatorNameNotEqualToOrIsNull(String value) {
            addCriterion(ISysDepartmentDAO.OperatorName + " is null OR " +
                ISysDepartmentDAO.OperatorName + " <>", value, "operatorName");

            return this;
        }

        public Criteria andOperatorNameNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.OperatorName);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andOperatorNameNotEqualTo(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorName + " <> ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andOperatorNameGreaterThan(String value) {
            addCriterion(ISysDepartmentDAO.OperatorName + " >", value,
                "operatorName");

            return this;
        }

        public Criteria andOperatorNameGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.OperatorName);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andOperatorNameGreaterThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorName + " > ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andOperatorNameGreaterThanOrEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.OperatorName + " >=", value,
                "operatorName");

            return this;
        }

        public Criteria andOperatorNameGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.OperatorName);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andOperatorNameGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorName + " >= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andOperatorNameLessThan(String value) {
            addCriterion(ISysDepartmentDAO.OperatorName + " <", value,
                "operatorName");

            return this;
        }

        public Criteria andOperatorNameLessThanForeignKey(java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.OperatorName);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andOperatorNameLessThan(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorName + " < ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andOperatorNameLessThanOrEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.OperatorName + " <=", value,
                "operatorName");

            return this;
        }

        public Criteria andOperatorNameLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.OperatorName);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andOperatorNameLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorName + " <= ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andOperatorNameLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysDepartmentDAO.OperatorName + " like",
                buffer.toString(), "operatorName");

            return this;
        }

        public Criteria andOperatorNameNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysDepartmentDAO.OperatorName + " not like",
                buffer.toString(), "operatorName");

            return this;
        }

        public Criteria andOperatorNameIn(List<String> values) {
            if (values.size() == 1) {
                return andOperatorNameEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.OperatorName + " in", values,
                    "operatorName");

                return this;
            }
        }

        public Criteria andOperatorNameNotIn(List<String> values) {
            if (values.size() == 1) {
                return andOperatorNameNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.OperatorName + " not in",
                    values, "operatorName");

                return this;
            }
        }

        public Criteria andOperatorNameIn(String[] values) {
            if (values.length == 1) {
                return andOperatorNameEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.OperatorName + " in",
                    Arrays.asList(values), "operatorName");

                return this;
            }
        }

        public Criteria andOperatorNameNotIn(String[] values) {
            if (values.length == 1) {
                return andOperatorNameNotEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.OperatorName + " not in",
                    Arrays.asList(values), "operatorName");

                return this;
            }
        }

        public Criteria andOperatorNameIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorName + " in ", subQueryBean,
                dao);

            return this;
        }

        public Criteria andOperatorNameNotIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.OperatorName + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andOperatorNameBetween(String value1, String value2) {
            addCriterion(ISysDepartmentDAO.OperatorName + " between", value1,
                value2, "operatorName");

            return this;
        }

        public Criteria andOperatorNameNotBetween(String value1, String value2) {
            addCriterion(ISysDepartmentDAO.OperatorName + " not between",
                value1, value2, "operatorName");

            return this;
        }

        public Criteria andParentDepartmentNameIsNull() {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " is null");

            return this;
        }

        public Criteria andParentDepartmentNameIsNotNull() {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName +
                " is not null");

            return this;
        }

        public Criteria andParentDepartmentNameIsNotEmpty() {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName +
                " is not null AND " + ISysDepartmentDAO.ParentDepartmentName +
                " <> ''");

            return this;
        }

        public Criteria andParentDepartmentNameIsEmpty() {
            addCriterion("(" + ISysDepartmentDAO.ParentDepartmentName +
                " is null OR " + ISysDepartmentDAO.ParentDepartmentName +
                " = '')");

            return this;
        }

        public Criteria andParentDepartmentNameEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " = ", value,
                "parentDepartmentName");

            return this;
        }

        public Criteria andParentDepartmentNameEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ParentDepartmentName);
            str.append(" = ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentDepartmentNameEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " = ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentDepartmentNameNotEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " <>", value,
                "parentDepartmentName");

            return this;
        }

        public Criteria andParentDepartmentNameNotEqualToOrIsNull(String value) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName +
                " is null OR " + ISysDepartmentDAO.ParentDepartmentName +
                " <>", value, "parentDepartmentName");

            return this;
        }

        public Criteria andParentDepartmentNameNotEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ParentDepartmentName);
            str.append(" <> ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentDepartmentNameNotEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " <> ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentDepartmentNameGreaterThan(String value) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " >", value,
                "parentDepartmentName");

            return this;
        }

        public Criteria andParentDepartmentNameGreaterThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ParentDepartmentName);
            str.append(" > ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentDepartmentNameGreaterThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " > ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentDepartmentNameGreaterThanOrEqualTo(
            String value) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " >=", value,
                "parentDepartmentName");

            return this;
        }

        public Criteria andParentDepartmentNameGreaterThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ParentDepartmentName);
            str.append(" >= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentDepartmentNameGreaterThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " >= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentDepartmentNameLessThan(String value) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " <", value,
                "parentDepartmentName");

            return this;
        }

        public Criteria andParentDepartmentNameLessThanForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ParentDepartmentName);
            str.append(" < ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentDepartmentNameLessThan(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " < ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentDepartmentNameLessThanOrEqualTo(String value) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " <=", value,
                "parentDepartmentName");

            return this;
        }

        public Criteria andParentDepartmentNameLessThanOrEqualToForeignKey(
            java.lang.String key) {
            StringBuffer str = new StringBuffer(ISysDepartmentDAO.ParentDepartmentName);
            str.append(" <= ").append(key);
            addForeignKeyCriterion(str.toString());

            return this;
        }

        public Criteria andParentDepartmentNameLessThanOrEqualTo(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " <= ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentDepartmentNameLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " like",
                buffer.toString(), "parentDepartmentName");

            return this;
        }

        public Criteria andParentDepartmentNameNotLike(String value) {
            StringBuffer buffer = new StringBuffer("%");
            buffer.append(value);
            buffer.append("%");
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " not like",
                buffer.toString(), "parentDepartmentName");

            return this;
        }

        public Criteria andParentDepartmentNameIn(List<String> values) {
            if (values.size() == 1) {
                return andParentDepartmentNameEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.ParentDepartmentName + " in",
                    values, "parentDepartmentName");

                return this;
            }
        }

        public Criteria andParentDepartmentNameNotIn(List<String> values) {
            if (values.size() == 1) {
                return andParentDepartmentNameNotEqualTo(values.get(0));
            } else {
                addCriterion(ISysDepartmentDAO.ParentDepartmentName +
                    " not in", values, "parentDepartmentName");

                return this;
            }
        }

        public Criteria andParentDepartmentNameIn(String[] values) {
            if (values.length == 1) {
                return andParentDepartmentNameEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.ParentDepartmentName + " in",
                    Arrays.asList(values), "parentDepartmentName");

                return this;
            }
        }

        public Criteria andParentDepartmentNameNotIn(String[] values) {
            if (values.length == 1) {
                return andParentDepartmentNameNotEqualTo(values[0]);
            } else {
                addCriterion(ISysDepartmentDAO.ParentDepartmentName +
                    " not in", Arrays.asList(values), "parentDepartmentName");

                return this;
            }
        }

        public Criteria andParentDepartmentNameIn(BaseQueryBean subQueryBean,
            IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentDepartmentNameNotIn(
            BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " not in ",
                subQueryBean, dao);

            return this;
        }

        public Criteria andParentDepartmentNameBetween(String value1,
            String value2) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName + " between",
                value1, value2, "parentDepartmentName");

            return this;
        }

        public Criteria andParentDepartmentNameNotBetween(String value1,
            String value2) {
            addCriterion(ISysDepartmentDAO.ParentDepartmentName +
                " not between", value1, value2, "parentDepartmentName");

            return this;
        }
    }
}
